Spread Windows Forms 10.0 Product Documentation
ComplexBorderSide Constructor(Boolean,Color,Int32,DashStyle,Single[],Single[])
Example 


Whether to draw that size of the border
Color for this side of the border
Width of this side of the border, in pixels
Style of dashed line for this side of the border; a setting of the DashStyle enumeration of the Microsoft .NET Framework
Pattern of dashes for this side of the border
Array of values that specify a compound line made up of parallel lines and spaces. The elements in the array must be in increasing order, not less than 0, and not greater than 1. The number of elements in the array must be even.
Creates one side of a four-sided, complex border with the specified color, width, dash style, dash pattern and compound array, and whether to draw the side.
Syntax
'Declaration
 
Public Function New( _
   ByVal draw As Boolean, _
   ByVal color As Color, _
   ByVal width As Integer, _
   ByVal dashStyle As DashStyle, _
   ByVal dashPattern() As Single, _
   ByVal compoundArray() As Single _
)
'Usage
 
Dim draw As Boolean
Dim color As Color
Dim width As Integer
Dim dashStyle As DashStyle
Dim dashPattern() As Single
Dim compoundArray() As Single
 
Dim instance As New ComplexBorderSide(draw, color, width, dashStyle, dashPattern, compoundArray)
public ComplexBorderSide( 
   bool draw,
   Color color,
   int width,
   DashStyle dashStyle,
   float[] dashPattern,
   float[] compoundArray
)

Parameters

draw
Whether to draw that size of the border
color
Color for this side of the border
width
Width of this side of the border, in pixels
dashStyle
Style of dashed line for this side of the border; a setting of the DashStyle enumeration of the Microsoft .NET Framework
dashPattern
Pattern of dashes for this side of the border
compoundArray
Array of values that specify a compound line made up of parallel lines and spaces. The elements in the array must be in increasing order, not less than 0, and not greater than 1. The number of elements in the array must be even.
Exceptions
ExceptionDescription
System.ArgumentExceptionSpecified dash pattern not valid; must be positive value
System.ArgumentExceptionSpecified compound array values not valid; must be between 0 and 1
Remarks

A complex border can have multiple lines. This is done by drawing a compound line with a pen that has the pattern defined in the compoundArray. The array of values specifies the starting point, the start of each line and the start of each spacing as a percentage of the total width of the pen.

The elements in the compound array must be in increasing order between 0 and 1.

For examples that show a complex border, refer to Creating a Complex Border with Multiple Lines.

For more details on the pen object, refer to the Compound Array for the Pen object in the Microsoft .NET Framework Reference documentation.

Example
This example creates one side of a four-sided, complex border with the specified color, width, dash style, dash pattern and compound array, and whether to draw the side.
FarPoint.Win.ComplexBorderSide side = new FarPoint.Win.ComplexBorderSide(Color.Red, 1.5, Drawing2D.DashStyle.Dash, new float[] {0.33F, 0.5F, 0.66F, 1.0F}, new float[] {0.33F, 0.5F, 0.66F, 1.0F});
FarPoint.Win.ComplexBorder bord = new FarPoint.Win.ComplexBorder(side);
Dim side As New FarPoint.Win.ComplexBorderSide(Color.Red, 1.5, Drawing2D.DashStyle.Dash, New Single() {0.33F, 0.5F, 0.66F, 1.0F}, New Single() {0.33F, 0.5F, 0.66F, 1.0F})
Dim bord As New FarPoint.Win.ComplexBorder(side)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

ComplexBorderSide Class
ComplexBorderSide Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.